/**
 * Description: RegisterInfoTypeAction.java
 * Copyright (c) 2008-2009  Neo. 
 * All Rights Reserved.
 * @version 1.0  Apr 2, 2009 2:43:02 PM 李萌（neolimeng@gmail.com）created
 */
package org.paradise.dms.web.action.registerinfo;

import java.util.List;

import net.sf.json.JSONArray;

import org.apache.log4j.Logger;
import org.directwebremoting.annotations.RemoteProxy;
import org.paradise.dms.pojo.RegisterInfoType;
import org.paradise.dms.services.RegisterInfoTypeService;
import org.paradise.dms.web.action.DMSBaseAction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

/**
 * Description: Copyright (c) 2008-2009 Neo. All Rights Reserved.
 * 
 * @version 1.0 Apr 2, 2009 2:43:02 PM 李萌（neolimeng@gmail.com）created
 */
@RemoteProxy(name = "registerInfoTypeAction")
@Service
public class RegisterInfoTypeAction extends DMSBaseAction {
	/**
	 * 
	 */
	private static final long serialVersionUID = -8156745458905832361L;

	@SuppressWarnings("unused")
	private static Logger log = Logger.getLogger(RegisterInfoTypeAction.class);

	@Autowired
	@Qualifier("registerInfoTypeServiceImpl")
	private RegisterInfoTypeService registerInfoTypeService;

	private RegisterInfoType rit;
	private List<RegisterInfoType> ritl;

	public JSONArray getAllRegisterInfoType() {
		ritl = this.registerInfoTypeService.getAllRegisterInfoType();
		if (ritl != null && ritl.size() > 0) {
			JSONArray jsonarray = JSONArray.fromObject(ritl);
			return jsonarray;
		}
		return null;
	}

	/**
	 * @return the registerInfoTypeService
	 */
	public RegisterInfoTypeService getRegisterInfoTypeService() {
		return registerInfoTypeService;
	}

	/**
	 * @param registerInfoTypeService
	 *            the registerInfoTypeService to set
	 */
	public void setRegisterInfoTypeService(RegisterInfoTypeService registerInfoTypeService) {
		this.registerInfoTypeService = registerInfoTypeService;
	}

	/**
	 * @return the rit
	 */
	public RegisterInfoType getRit() {
		return rit;
	}

	/**
	 * @param rit
	 *            the rit to set
	 */
	public void setRit(RegisterInfoType rit) {
		this.rit = rit;
	}

	/**
	 * @return the ritl
	 */
	public List<RegisterInfoType> getRitl() {
		return ritl;
	}

	/**
	 * @param ritl
	 *            the ritl to set
	 */
	public void setRitl(List<RegisterInfoType> ritl) {
		this.ritl = ritl;
	}
}
